function dpcode(filepath)

% DPCODE(PATH) dumplicated pcode .m file in PATH
%		
% Example
%		dpcode()  dumplicated pcode .m file in current path
%   dpcode('c:\test\) dumplicated pcode .m file in c:\test
%

% Author : Xiaobiao Huang
% $Date: 2013-06-24 15:38:35
% Version: 1.0.0.0

if nargin < 1
	filepath = pwd;
end
% if strfind(filepath,'./')
% 	filepath = [pwd filepath];
% end
files = dir(filepath);
nfiles = length(files);
for ifile = 3 : nfiles
	filename = files(ifile,1).name;
	[path name ext] = fileparts(filename);
	if strcmp(ext,'.m')        
		pcode([filepath  name ext]);
        disp(['pcode ' filepath  name ext ' finished']);
	end
end